home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Workbench Design
/
WB Collection.iso
/
datatypes
/
dfadt
/
source
/
dfadt.h
< prev
next >
Wrap
C/C++ Source or Header
|
1996-04-07
|
3KB
|
147 lines
#ifndef DFADT_H
#define DFAFT_H
#define DFADTPREFS "ENV:DFADT.prefs"
#define G(o) ((struct Gadget *) (o))
#define PUDDLE_SIZE (8 * 1048)
#define TRESH_SIZE 1024
#define BUFFER_SIZE 1024
#define BACKSPACE '\010'
#define EOS '\0'
#define MAX(a,b) ((a>b)?a:b)
// ********************************************
// First address file line contains a "magic...
// ********************************************
// The length of the 'magic' MUST be the same for every version!!!
#define DFAMAGICLEN (strlen(DFAMAGIC))
// Address file for DFA V1.0
#define DFAMAGIC "DFAddress1.0"
#define DFALINES 13
// Address file for DFA V1.1
#define DFA11MAGIC "DFAddress1.1"
#define DFA11LINES 15
// Notice: DFA V1.2x had no new address file format !!!
// Address file for DFA V1.3
#define DFA13MAGIC "DFAddress1.3"
#define DFA13LINES 16
// Address file for DFA V1.4
#define DFA14MAGIC "DFAddress1.4"
#define DFA14LINES 18
// Address file for DFA V1.5
#define DFA15MAGIC "DFAddress1.5"
#define DFA15LINES 19
// **********
// Offsets...
// **********
#define ITEMOFFSET_SALUTATION 0
#define ITEMOFFSET_FIRSTNAME 1
#define ITEMOFFSET_NAME 2
#define ITEMOFFSET_CO 3
#define ITEMOFFSET_STREET 4
#define ITEMOFFSET_ZIP 5
#define ITEMOFFSET_CITY 6
#define ITEMOFFSET_STATE 7
#define ITEMOFFSET_COUNTRY 8
#define ITEMOFFSET_BIRTHDAY 9
#define ITEMOFFSET_PHONE 10
#define ITEMOFFSET_FAX 11
#define ITEMOFFSET_EMAIL1 12
#define ITEMOFFSET_EMAIL2 13
#define ITEMOFFSET_EMAIL3 14
#define ITEMOFFSET_COMMENT 15
#define ITEMOFFSET_GROUP1 16
#define ITEMOFFSET_GROUP2 17
#define ITEMOFFSET_GROUP3 18
#define ITEMOFFSET_GROUP4 19
#define ITEMOFFSET_GROUP5 20
#define ITEMOFFSET_GROUP6 21
#define ITEMOFFSET_GROUP7 22
#define ITEMOFFSET_GROUP8 23
#define ITEMOFFSET_SELECTED 24
#define ITEMOFFSET_EXTERNAL 25
#define ITEMOFFSET_NUM 26
// *************
// Structures...
// *************
// Address entry
struct AData
{
UBYTE * ad_Salutation;
UBYTE * ad_Name;
UBYTE * ad_FirstName;
UBYTE * ad_Street;
UBYTE * ad_CO;
UBYTE * ad_ZIP;
UBYTE * ad_City;
UBYTE * ad_State;
UBYTE * ad_Country;
UBYTE * ad_Birthday;
UBYTE * ad_Phone;
UBYTE * ad_Fax;
UBYTE * ad_EMail1;
UBYTE * ad_EMail2;
UBYTE * ad_EMail3;
UBYTE * ad_Comment;
UBYTE * ad_External;
LONG ad_Groups[8];
LONG ad_Selected;
};
struct Address
{
struct Node as_Node;
UWORD as_PadDummy;
struct AData as_Data;
};
struct DDTData
{
APTR ddt_Pool;
UWORD ddt_PadDummy;
struct List ddt_List;
};
struct FIELDDESC
{
LONG offset;
char * description;
LONG length;
};
#endif